from django.urls import path, include
from rest_framework.routers import DefaultRouter

from . import views

# 创建路由器并注册视图集
router = DefaultRouter()
router.register(r'questions', views.QuestionViewSet, basename='question')
router.register(r'question-banks', views.QuestionBankViewSet, basename='question-bank')

app_name = 'question_bank'

urlpatterns = [
    # 包含路由器生成的URL
    path('', include(router.urls)),
]